package crs.users.facade;

import javax.servlet.ServletContext;

import org.springframework.transaction.annotation.Transactional;

import crs.exceptions.EmailExistsException;
import crs.exceptions.PasswordErrorException;
import crs.exceptions.UserExistsException;
import crs.perfiles.forms.UsersForm;
import crs.users.forms.RegistroForm;
import crs.users.model.Users;
import crs.web.utilidades.FicheroSubido;
@Transactional
public interface UserFacade {
	Users registrarUsuario(RegistroForm rf)throws EmailExistsException, UserExistsException;

	UsersForm obtUserDet(String name, String string);

	void actIdData(RegistroForm rg) throws UserExistsException,
			EmailExistsException, PasswordErrorException;

	RegistroForm obtUserRegDet(String name, String role);

	Users actUsuData(UsersForm userForm, FicheroSubido fs, ServletContext context);
	boolean userExist(String username, Integer id);
	boolean emailExist(String username, Integer id);
	boolean userPass(String oldPassword, Integer id);
	boolean emailExist(String username);
	boolean userExist(String username);
	Users getUserByEmail(String email);
	Users getUserByUsername(String username);
	Users findById(Integer id);
	
		
	
}
